using System;
using System.Collections.Generic;


namespace Gfw.Models.Stock
{
	[Serializable]
	public partial class StkMarket: IEquatable<StkMarket>
	{

		#region Private Members

		private string _id; 
		private int _runningstate; 
		private decimal _tradecount; 
		private decimal _currentprice; 
		private int _ispurchase; 
		private int _issale; 		
		#endregion

		#region Constructor

		public StkMarket()
		{
			_id = String.Empty; 
			_runningstate = 0; 
			_tradecount = 0; 
			_currentprice = 0; 
			_ispurchase = 0; 
			_issale = 0; 
		}
		#endregion // End of Default ( Empty ) Class Constuctor

		#region Public Properties
			
		public virtual string Id
		{
			get
			{ 
				return _id;
			}

			set	
			{	
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for Id", value, "null");
				
				if(  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for Id", value, value.ToString());
				
				_id = value;
			}
		}
			
		public virtual int RunningState
		{
			get
			{ 
				return _runningstate;
			}
			set
			{
				_runningstate = value;
			}

		}
			
		public virtual decimal TradeCount
		{
			get
			{ 
				return _tradecount;
			}
			set
			{
				_tradecount = value;
			}

		}
			
		public virtual decimal CurrentPrice
		{
			get
			{ 
				return _currentprice;
			}
			set
			{
				_currentprice = value;
			}

		}
			
		public virtual int IsPurchase
		{
			get
			{ 
				return _ispurchase;
			}
			set
			{
				_ispurchase = value;
			}

		}
			
		public virtual int IsSale
		{
			get
			{ 
				return _issale;
			}
			set
			{
				_issale = value;
			}

		}
			
				
		#endregion 

		#region Public Functions

		#endregion //Public Functions

		#region IEquatable members

		public virtual bool Equals(StkMarket other)
		{
			if (other == this)
				return true;
		
			return ( other != null ) &&
				( this._id == other.Id );
				   
		}

		#endregion
		
	}
}
